package com.initialize.appapi.service;

import com.initialize.pub.dao.CommentDAO;
import com.initialize.pub.mybatis.plus.entity.Comments;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: jane
 * Date: 2020/4/29
 * Time: 1:24 下午
 * Description:
 */
@Service
public class CommentsService {

    final
    CommentDAO commentDAO;

    public CommentsService(CommentDAO commentDAO) {
        this.commentDAO = commentDAO;
    }


    public List<Comments> getLatestComment(int size) {
        return commentDAO.sortLimit(size);
    }
}